import { useLoader } from "@react-three/fiber";
import * as THREE from "three";

// 全景穹顶
export default ({ pic }) => {
  return (
    <mesh>
      <sphereGeometry args={[500, 60, 40]} />
      <meshBasicMaterial
        map={useLoader(THREE.TextureLoader, pic) as any}
        side={THREE.BackSide}
      />
    </mesh>
  );
};
